package com.mkyong.soa.client;

import java.io.IOException;
import java.rmi.NotBoundException;
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;

import com.mkyong.soa.server.Business;

public class Client {
	public static void main(String[] args) throws IOException, NotBoundException {
		Registry registry = LocateRegistry.getRegistry("localhost");
		String name = "businessDemo";
		Business biz = (Business) registry.lookup(name);
		String result = biz.echo("zhangsan , nihao ");
		System.out.println("result:"+result);
	}
}
